package com.xr.redis.pubsub.service.listener;

import com.xr.redis.pubsub.model.Message;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author Arnold Yand
 * @summary 订阅监听器
 * @time 2018/8/4 14:03
 */
public abstract class AbstractPubSubListener {

  protected Logger logger = LoggerFactory.getLogger(AbstractPubSubListener.class);

  protected String listenerId;

  public void onMessage(Message message) {
    logger.info("received message:{}.", message.getMsgId());
  }

  public String getListenerId() {
    return listenerId;
  }
}
